package com.cloud.nacosconfig.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kangwen
 */
@RefreshScope
@RestController
public class ConfigController {

	@Value("${notice.value}")
	private String notice;

	public String getNotice() {
		return notice;
	}

	public void setNotice(String notice) {
		this.notice = notice;
	}

	@RequestMapping("/config")
	public String getCfg() {
		System.out.println(notice);
		return notice;
	}
}
